import request from "utils/http";
import baseURL from "./baseUrlConfig";


// 一键加油
export function CreateOrder(data) {
  return request({
    // baseURL: baseURL.host,
    url: '/api/order/create',
    method: 'post',
    data: data
  })
}

// 油卡充值
export function CreateRechargeOrder(data) {
  return request({
    // baseURL: baseURL.host,
    url: '/api/rechargeorder/create',
    method: 'post',
    data: data
  })
}

export function OrderList(data) {
  return request({
    // baseURL: baseURL.host,
    url: '/api/order/list',
    method: 'post',
    data: data
  })
}

export function OrderDetail(data) {
  return request({
    // baseURL: baseURL.host,
    url: '/api/order/detail',
    method: 'post',
    data: data
  })
}


export function CancelOrder(data) {
  return request({
    // baseURL: baseURL.host,
    url: '/api/order/cancel',
    method: 'post',
    data: data
  })
}

export function huika(data) {
  return request({
    // baseURL: baseURL.host,
    url: '/api/order/huika',
    method: 'post',
    data: data
  })
}

// 查询支付结果
export function queryPayment(data) {
  return request({
    // baseURL: baseURL.host,
    url: '/api/payment/query_result',
    method: 'post',
    data: data
  })
}

// 重新支付
export function againPay(data) {
  return request({
    // baseURL: baseURL.host,
    url: '/api/payment/query',
    method: 'post',
    data: data
  })
}
